package com.itbbfx.util;


import com.itbbfx.service.warehourse.DrugstoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class MedicinalUtil {
    @Autowired
    private DrugstoreService drugstoreService;

    /**
     * 定时清理过期药品
     */
    @Scheduled(cron = "00 30 8 28 * *")
    public void cleanExpiredDrugs(){
        drugstoreService.cleanExpiredDrugs();
    }

    /**
     * 定时查询 补充药品库存
     */
    /*@Scheduled(cron = "00 30 8 1 * *")
    public void inspectStock(){
        drugstoreService.supplementStock();
    }*/
}